package com.imooc.sell.dataobject;

import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Proxy;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 主订单类
 */
@Entity
@Proxy(lazy = false)
@DynamicUpdate
/** 自动生成get set toString*/
@Data
@Table(name = "order_master")
public class OrderMaster {
    /**
     * 订单id
     */
    @Id
    @GeneratedValue(generator = "myGenerator")
    @GenericGenerator(name = "myGenerator", strategy = "com.imooc.sell.utils.MyGenerator")
    private String orderId;
    /**
     * 买家姓名
     */
    private String buyerName;
    /**
     * 买家电话
     */
    private String buyerPhone;
    /**
     * 买家地址
     */
    private String buyerAdderss;
    /**
     * 买家openid
     */
    private String buyerOpenid;
    /**
     * 订单总价
     */
    private BigDecimal orderAmount;
    /**
     * 订单状态
     */
    private Short orderStatus;
    /**
     * 支付状态
     */
    private Short payStatus;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;

    public OrderMaster() {

    }
}
